<#import '/ftlLibrary/properteisVariable.ftl' as pv/>
<link href="assets/css/bootstrap-select.css" rel="stylesheet" />
<script src="assets/js/select2/select2.js"></script>
<div class="row">
	<!-- 映射列表 -->
	<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12" id="leftTree">
		<div class="widget flat radius-bordered">
			<div class="widget-header bg-sky theme hidden">
				<span class="widget-caption">操作权限列表</span>
			</div>
			<div class="widget flat searchCriteria">
                <div class="widget-header bordered-bottom bordered-sky theme-bordered">
                    <span class="widget-caption">筛选区</span>
                    <div class="widget-buttons">
                   		<!-- 业务按钮 begin -->
                   		<label class="businessBtns">
							<@hp code="CZQXGL89563062100216-list_search"/>

							<@hp code="CZQXGL89563062100216-list_add" params="[serializeNum=${serializeNum},editUrl=${editUrl}]"/>

							<@hp code="CZQXGL89563062100216-edit" params="[serializeNum=${serializeNum},editUrl=${editUrl}]"/>

							<@hp code="CZQXGL89563062100216-BatchDelete" params="[serializeNum=${serializeNum},batchDeleteUrl=${batchDeleteUrl}]"/>

							<@hp code="CZQXGL89563062100216-importData"/>

							<@hp code="CZQXGL89563062100216-exportData"/>
                   		</label>
                   		<!-- 业务按钮 end -->
                   		<!-- 面板控制按钮 begin -->
                        <a href="#" data-toggle="collapse"><i class="fa red fa-minus"></i></a>
                        <a href="#" data-toggle="config"><i class="fa red fa-cog"></i></a>
                   		<!-- 面板控制按钮 end -->
                    </div><!--Widget Buttons-->
                </div><!--Widget Header-->
                <div class="widget-body" style="display: block;">
                    <div class="search_Bar">
						<form id="${searchFormId}" action="${actionUrl}" method="POST">
							<table class="searchAreaTable">
								<tbody>
									<tr>
										<!-- 条件属性,所有条件放在一行,系统自动计算每一行展示的条件属性个数 -->
										<th><label>管理员Id</label></th>
										<td><input type="text" name="adminUserPermissionAllot.adminUserId" value="${search_map['adminUserPermissionAllot.adminUserId'][0]}"></td>
										<th><label>权限Id</label></th>
										<td><input type="text" name="adminUserPermissionAllot.menuPermissionId" value="${search_map['adminUserPermissionAllot.menuPermissionId'][0]}"></td>
										<th><label>角色Id</label></th>
										<td><input type="text" name="rolePermissionAllot.roleId" value="${search_map['rolePermissionAllot.roleId'][0]}"></td>
										<th><label>权限Id</label></th>
										<td><input type="text" name="rolePermissionAllot.menuPermissionsId" value="${search_map['rolePermissionAllot.menuPermissionsId'][0]}"></td>
										<th><label>权限名称</label></th>
										<td><input type="text" name="name" value="${search_map.name[0]}"></td>
										<th><label>批量</label></th>
										<td><input type="text" name="pageName" value="${search_map.pageName[0]}"></td>
										<th><label>权限编码</label></th>
										<td><input type="text" name="code" value="${search_map.code[0]}"></td>
										<th><label>标签名</label></th>
										<td><input type="text" name="tagName" value="${search_map.tagName[0]}"></td>
										<th><label>内部html</label></th>
										<td><input type="text" name="innerHtml" value="${search_map.innerHtml[0]}"></td>
										<th><label>ID属性</label></th>
										<td><input type="text" name="idAttr" value="${search_map.idAttr[0]}"></td>
										<th><label>权重</label></th>
										<td><input type="number" name="weight" value="${search_map.weight[0]}"></td>
										<th><label>是否禁用</label></th>
										<td>
											<select name="isForbidden" class="selectpicker" data-live-search="true">
												<optgroup label="选择" data-icon="icon-ok">
														<option value="">所有</option>
														<option value="1">是</option>
														<option value="0">否</option>
													</optgroup>
											</select>
											<script type="text/javascript">
												$("[name='isForbidden']").val("${search_map.isForbidden[0]}");
											</script>
										</td>
										<th><label>创建时间</label></th>
										<td>
											<div class="beginValueDiv">
												<input id="d4311" type="text" name="createTime_begin" class="beginValue Wdate" value="${search_map.createTime_begin[0]}"
												onFocus="WdatePicker({doubleCalendar:true,maxDate:'#F{$dp.$D(\'d4312\')}',dateFmt:'yyyy-MM-dd HH:mm:ss'})" placeholder="起始时间" >
											</div>
											<div class="endValueDiv">
												<input id="d4312"  type="text" name="createTime_end" class="endValue Wdate"  value="${search_map.createTime_begin[0]}"
												onFocus="WdatePicker({doubleCalendar:true,minDate:'#F{$dp.$D(\'d4311\')}',dateFmt:'yyyy-MM-dd HH:mm:ss'})" placeholder="结束时间" >
											</div>
										</td>
										<th><label>创建人Id</label></th>
										<td><input type="text" name="createUserId" value="${search_map.createUserId[0]}"></td>
										<th><label>版本</label></th>
										<td><input type="number" name="version" value="${search_map.version[0]}"></td>
									</tr>
								</tbody>
							</table>
						</form>
					</div>
               </div><!--Widget Body-->
            </div><!--Widget-->
			<div class="widget-body no-padding">
				<div class="topPagingBar">
					${pagingBar}
				</div>
				<div class="table-scrollable">
					<!-- 数据表列信息列表 -->
					<table class="table table-bordered dataTable">
						<thead>
							<tr>
								<th title="选择" class="checkboxColumnTh fixedColumn " fixed-align="left">
									<div class="checkbox">
	                                    <label>
	                                        <input type="checkbox" class="chkAll">
	                                        <span class="text"></span>
	                                    </label>
	                                </div>
								</th>
								<th title="属性名">序号</th>
								<th title="主键">主键</th>
								<th title="管理员Id">管理员关联的菜单权限</th>
								<th title="角色Id">角色关联菜的单权限</th>
								<th title="所属菜单">所属菜单</th>
								<th title="权限名称">权限名称</th>
								<th title="页面名称">页面名称</th>
								<th title="权限编码">权限编码</th>
								<th title="标签名">标签名</th>
								<th title="内部html">内部html</th>
								<th title="操作权限ID属性">操作权限ID属性</th>
								<th title="权重">权重</th>
								<th title="是否禁用">是否禁用</th>
								<th title="创建时间">创建时间</th>
								<th title="创建人Id">创建人Id</th>
								<th title="版本">版本</th>
								<th class="fixedColumn" style="width: 100px">操作</th>
							</tr>
						</thead>
						<tbody>
							<#if page_bean.list?size==0>
								<tr>
									<td align="center">无数据</td>
								</tr>
							</#if>
							<#list page_bean.list as data>
								<tr>
									<td class="checkboxColumnTd">
										<div class="checkbox">
		                                    <label>
		                                        <input type="checkbox" class="chk"  name="id" value="${data.id}">
		                                        <span class="text"></span>
		                                    </label>
		                                </div>
									</td>
									<td>${data_index+1+(page_bean.pageNo-1)*page_bean.pageSize}</td>
									<td>${(data.id???string(data.id?html,"未设置"))!'未设置'}</td>
									<td>
										${(data.adminUserPermissionAllot.adminUserId???string(data.adminUserPermissionAllot.adminUser.userName?html,""))!'未设置'}
										-
										${(data.adminUserPermissionAllot.menuPermissionId???string(data.sysMenuPermissions.name?html,""))!'未设置'}
									</td>
									<td>
										${(data.rolePermissionAllot.roleId???string(data.rolePermissionAllot.role.roleName?html,""))!'未设置'}
										-
										${(data.rolePermissionAllot.menuPermissionId???string(data.sysMenuPermissions.name?html,""))!'未设置'}<br>
									</td>
									<td>${(data.menuId???string(data.sysMenuPermissions.name?html,""))!'未设置'}</td>
									<td>${(data.name???string(data.name?html,"未设置"))!'未设置'}</td>
									<td>${(data.pageName???string(data.pageName?html,"未设置"))!'未设置'}</td>
									<td>${(data.code???string(data.code?html,"未设置"))!'未设置'}</td>
									<td>${(data.tagName???string(data.tagName?html,"未设置"))!'未设置'}</td>
									<td>${(data.innerHtml???string(data.innerHtml?html,"未设置"))!'未设置'}</td>
									<td>${(data.idAttr???string(data.idAttr?html,"未设置"))!'未设置'}</td>
									<td>${(data.weight???string(data.weight?html,"未设置"))!'未设置'}</td>
									<td>${data.isForbidden?string('是','否')}</td>
									<td>${(data.createTime???string(data.createTime?html,"未设置"))!'未设置'}</td>
									<td>${(data.createUserId???string(data.createUserId?html,"未设置"))!'未设置'}</td>
									<td>${(data.version???string(data.version?html,"未设置"))!'未设置'}</td>
									<td align="center">
										<@hp code="CZQXGL89563062100216-list_table_tr_edit" params="[serializeNum=${serializeNum},editUrl=${editUrl},targetDataId=${data.id}]" />

										<@hp code="CZQXGL89563062100216-list_table_tr_delete" params="[serializeNum=${serializeNum},deleteUrl=${deleteUrl},targetDataId=${data.id}]"/>
									</td>
								</tr>
							</#list>
						</tbody>
					</table>
				</div>
				 ${pagingBar}
			</div>
		</div>
	</div>
</div>
<script>
$(".selectpicker").select2();
</script>